package com.niiwoo.civet.scheduler.trigger;

import com.alibaba.dubbo.config.annotation.Reference;
import com.niiwoo.civet.trade.service.invest.InvestorReceiveNoticeJobDubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by huangmin on 2018/01/18.
 */
@Component
public class InvestorReceiveNoticeJobTrigger {
    private static final Logger logger = LoggerFactory.getLogger(InvestorReceiveNoticeJobTrigger.class);

    @Reference(version = "1.0.0")
    InvestorReceiveNoticeJobDubboService investorReceiveNoticeJobDubboService;


    @Scheduled(cron = "${newRefund.investor_receive_send}")
    public void investorReceiveSendSms() {
        logger.info("投资标的回款(当天)###投资回款通知###次日7点后统计发送前一日投资回款通知###开始");
        investorReceiveNoticeJobDubboService.investorReceiveSendSmsAndLetter();
        logger.info("投资标的回款(当天)###投资回款通知###次日7点后统计发送前一日投资回款通知###结束");
    }

}
